#ifndef TYPES_H
#define TYPES_H

typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef unsigned long uint64;
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;
typedef signed long int64;

// 布尔类型
typedef int bool;
#define true  1
#define false 0

// 控制字符（退格键）
#define BACKSPACE 0x100
#define C(x) ((x) - '@')

// 文本颜色定义（ANSI转义序列）
#define COLOR_BLACK   "\033[30m"    // 黑色
#define COLOR_RED     "\033[31m"    // 红色
#define COLOR_GREEN   "\033[32m"    // 绿色
#define COLOR_YELLOW  "\033[33m"    // 黄色
#define COLOR_BLUE    "\033[34m"    // 蓝色
#define COLOR_MAGENTA "\033[35m"    // 品红
#define COLOR_CYAN    "\033[36m"    // 青色
#define COLOR_WHITE   "\033[37m"    // 白色
#define COLOR_RESET   "\033[0m"     // 重置为默认颜色

// 整数边界值
#define INT_MAX 2147483647
#define INT_MIN (-2147483648)

typedef uint64 pte_t;
typedef uint64 *pagetable_t;

#endif